package com.jvm123.api.api.controller

import org.pegdown.PegDownProcessor
import org.springframework.web.bind.annotation.PostMapping
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController

/**
 *
 * @author yawn http://jvm123.com
 *     2019/12/17 9:32
 */
@RestController
@RequestMapping("md")
class MdController {

    @PostMapping("")
    String md(String msg) {
        PegDownProcessor peg =  new PegDownProcessor(Integer.MAX_VALUE)
        peg.markdownToHtml(msg)
    }
}
